Barcode Xpress for Linux v13.1 - Updated
Access Results
User Guide > How To > Access Results

BX_BarcodeResult

The BX_analyze_dib, BX_analyze_file, and BX_analyze_bmp methods returns a populated BX_AnalyzeResult structure containing BarcodeResults array of objects. Each element of the BarcodeResults array contains the results of a single recognized barcode or unsolved barcode. (See ReturnPossibleBarcodes.)

Copy Code
// call BX_analyze_file, BX_analyze_dib, or BX_analyze_bmp to detect barcodes in the image
// all detected barcodes will be returned to the
// BarcodeResults object array.
     BX_AnalyzeParameters  params = BX_DefaultAnalyzeParameters;
     BX_AnalyzeResult      result;
     BX_Status             status;
 
     status = BX_analyze_dib(&params, data, &result);
 
     if( 0 == result.BarcodeResultsLength ) {
          printf("No results\n");
          BX_free_analyze_result( &result );
          return;
     }
 
     for( int i=0; i<result.BarcodeResultsLength; ++i ) {
          BX_BarcodeResult *res = &result.BarcodeResults[i];
          printf("Result #%d\n", i+1);
          printf("\tValue: %s\n", res->Value);
     }
 
     BX_free_analyze_result( &result );{color}

Properties

Property Description
Area Gets the bounding rectangular area of the recognized barcode.
Name Gets the name of the recognized barcode.
NameLength Gets the length of the barcode name.
BarcodeType Gets the type of the recognized barcode.
Value Gets the value of the recognized barcode.
Confidence Gets the confidence of the recognized barcode.
ValueLength Gets the length of the result string.
CheckSumLength Gets the number of characters in the recognized checksum.
Point1 Gets the top left coordinate of the recognized barcode.
Point2 Gets the top right coordinate of the recognized barcode.
Point3 Gets the bottom left coordinate of the recognized barcode.
Point4 Gets the bottom right coordinate of the recognized barcode.
Skew Gets the angle of skew for the recognized barcode analyzed.
CheckSumValid Gets a valid checksum for a recognized barcode.
ModeTransitions Get the array of BX_ModeTransition structures representing mode transitions encountered.
ModeTransitionsLength Get the number of mode transitions encountered.

Order of Results

Since Barcode Xpress can return multiple barcode results from a single scan, the detected barcode results (both solved and unsolved) will be sorted using the following criteria. Note that all solved barcodes will be ordered before unsolved barcodes.

First, the confidence factor is used to sort the barcode results from highest confidence to lowest. The Confidence property gets the confidence of the barcode that was recognized.

Next, for any barcodes with the same confidence, they will then be sorted by their location, from top to bottom, then left to right.